<?php

return [
    'templatePath' => __DIR__ . '/../view',

    'router' => array(
        'routes' => array(
            'admin' => array(
                'type' => 'literal',
                'options' => array(
                    'route' => '/admin',
                    'defaults' => array(
                        'controller' => 'Admin\Controller',
                        'action' => 'index'
                    )
                ),
                'may_terminate' => true,
                'child_routes' => array(
                    'login' => array(
                        'type' => 'literal',
                        'options' => array (
                            'route' => '/login',
                            'defaults' => array (
                                'action' => 'login'
                            )
                        )
                    ),
                    'logout' => array(
                        'type' => 'literal',
                        'options' => array (
                            'route' => '/logout',
                            'defaults' => array (
                                'action' => 'logout'
                            )
                        )
                    ),
                    'users' => array(
                        'type' => 'segment',
                        'options' => array (
                            'route' => '/users[/:action][/:id]',
                            'constraints' => array(
                                'action'    => '[a-zA-Z][a-zA-Z0-9_-]+',
                                'id'        => '[0-9]+'
                            ),
                            'defaults' => array (
                                'action' => 'list'
                            )
                        )
                    )
                )
            )
        )
    )
];
